import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { terser } from 'rollup-plugin-terser' 
export default defineConfig({
  plugins: [vue()],
  build: {
    lib: {
      entry: './src/index.js',
      formats: ['es', 'umd'],
      name: 'CesiumSDK'
    },
    rollupOptions: {
      plugins: [
        terser() // 压缩代码的插件
      ]
    }
  },
  resolve: {
    alias: {
      '@': './src'
    }
  }
})